Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
misfit-bolt
Advanced tools
Thin wrapper around sandeepmistry/noble, that helps Misfit Bolt bulbs discovery, and allows turning them on/off and changing their color and brightness, as well as reading their currently set values. Currently support setting color and brightness via RGBA and HSB.
To connect to the Misfit Bolt, you need BLE capabilities. See sandeepmistry/noble prerequisites for more details.
npm install misfit-bolt
Type static
Arguments
Bolt
instance as first argument.Returns
undefined
Example
Bolt.discover(function(bolt) {
// do something
}, ['29852E52-67A0-490A-BC55-7FAB809AD0C0']);
Type static
Arguments
Returns
<Bolt>
instance, if found.
Example
let bolt = Bolt.get('29852E52-67A0-490A-BC55-7FAB809AD0C0');
// do something with bolt
Type static
Arguments
Returns
Bool
successfully removed
Example
Bolt.remove('29852E52-67A0-490A-BC55-7FAB809AD0C0');
Type instance
Arguments
Returns
instance
Example
bolt.connect(function() {
// do something
});
Type instance
Arguments
Returns
instance
Example
bolt.disconnect(function(){
// do something
});
Type instance
Arguments
Returns
instance
Example
bolt.on(function(){
// do something
});
Type instance
Arguments
Returns
instance
Example
bolt.off(function(){
// do something
});
Type instance
Arguments
String
type.Returns
instance
Example
bolt.get(function(error, value) {
// do something with value
});
Type instance
Arguments
CLTMP 3200,0
or CLTMP 3200,1
(used to toggle on / off). Other undocumented formats might exist.Returns
instance
Example
bolt.set("228,41,15,10", function(){
// do something
});
Type instance
Arguments
Array
type.Returns
instance
Example
bolt.getRGBA(function(error, rgbaValue) {
// do something with rgbaValue
});
Type instance
Arguments
[red, green, blue, alpha]
.Returns
instance
Example
bolt.setRGBA([228,41,15,10], function(){
// do something
});
Type instance
Arguments
Integer
type.Returns
instance
Example
bolt.getHue(function(error, hueValue) {
// do something with hueValue
});
Type instance
Arguments
Returns
instance
Example
bolt.setHue(12, function(){
// do something
});
Type instance
Arguments
Integer
type.Returns
instance
Example
bolt.getSaturation(function(error, saturationValue) {
// do something with saturationValue
});
Type instance
Arguments
Returns
instance
Example
bolt.setSaturation(12, function(){
// do something
});
Type instance
Arguments
Integer
type.Returns
instance
Example
bolt.getBrightness(function(error, brightnessValue) {
// do something with brightnessValue
});
Type instance
Arguments
Returns
instance
Example
bolt.setBrightness(12, function(){
// do something
});
Type instance
Arguments
Bool
type.Returns
instance
Example
bolt.getState(function(error, state) {
// do something with state
});
Type instance
Arguments
Returns
instance
Example
bolt.setState(true, function(error, state) {
// do something with state
});
Bolt = require('.');
// Discover every nearby Bolt
Bolt.discover(function(bolt) {
// Each time a bolt is discovered, connect to it
bolt.connect(function() {
var i = 0,
colors = [[228,41,15,10],
[216,62,36,10],
[205,55,56,10],
[211,27,76,10],
[166,18,97,10]];
// Change color every 500 ms
setInterval(function(){
var color = colors[i++ % colors.length];
bolt.setRGBA(color, function(){
// set complete
});
}, 500);
});
});
FAQs
Misfit Bolt Javascript Interface
The npm package misfit-bolt receives a total of 4 weekly downloads. As such, misfit-bolt popularity was classified as not popular.
We found that misfit-bolt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.